<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    .container{
        width: 500px;
        height: 200px;
        background: red;
    }
    .triangle{
        height: 142px;
        width: 142px;
        background: yellow;
        float: right;
        transform: rotate(45deg) translate(0px,100px);;
        transform-origin:right bottom;

    }
</style>
<body>
<div class="container">
    <div class="triangle">

    </div>
</div>
</body>
</html>